
package kr.or.kead.ui;

import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.HeadlessException;

import javax.swing.JFrame;

import kr.or.kead.domain.Auth;
import kr.or.kead.ui.meun.MenuMgn;
import javax.swing.BoxLayout;

public class MainFrame extends JFrame {
	private MenuMgn menu;
	private static Auth auth;
	
	public MainFrame(Auth auth) throws HeadlessException {
		this.auth = auth;
		initialize(auth);
	}
	
	private void initialize(Auth auth) {
		menu = new MenuMgn(this);
		menu.setAuth(auth);
		menu.enableMenu();
		setJMenuBar(menu);
		setTitle("학사관리");
		setVisible(true);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.X_AXIS));
	}

	public static Auth getAuth() {
		return auth;
	}

	public void setAuth(Auth auth) {
		this.auth = auth;
	}	
	
	
}